package com.aaa.dem1104.d01;

import java.util.function.BiPredicate;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/11/4  10:18
 */

/**
 * 对象方法引用。
 */
public class Test3 {
    public static void main(String[] args) {
        //比较两个字符串是否相同.--断言函数式接口.
//        BiPredicate<String, String> predicate = (t1, t2) -> t1.equals(t2);

        //对象方法引用:
        BiPredicate<String, String> predicate = String::equals;
        boolean test = predicate.test("汪豪杰帅", "汪豪杰");
        System.out.println(test);

    }
}
